<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/30 0030
 * Time: 05:00
 */
use yii\helpers\Url;
?>

<!DOCTYPE html>
<html>
<head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="renderer" content="webkit" />
    <title>发布</title>
    <link href="http://wenda.ghostchina.com/static/css/default/ico/favicon.ico?v=20140930" rel="shortcut icon" type="image/x-icon" />

    <link rel="stylesheet" type="text/css" href="http://wenda.ghostchina.com/static/css/bootstrap.css" />
<!--    <link rel="stylesheet" type="text/css" href="http://wenda.ghostchina.com/static/css/icon.css" />-->

    <link href="http://wenda.ghostchina.com/static/css/default/common.css?v=20140930" rel="stylesheet" type="text/css" />
    <link href="http://wenda.ghostchina.com/static/css/default/link.css?v=20140930" rel="stylesheet" type="text/css" />
    <link href="http://wenda.ghostchina.com/static/js/plug_module/style.css?v=20140930" rel="stylesheet" type="text/css" />

    <script src="./js/jquery-1.5.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
//         if(Check()){
            $("#loginButton").click(function() {
                var action = $("#question_form").attr('action');
                $.ajax({
                    type: "POST",
                    url: action,
                    dataType:"json",
                    data: {question_content: $("#question_content").val(),question_detail: $("#question_detail").val()},
                    'success': function(json)
                    {
                        if(json.status) {
                            alert(json.msg);
                            window.location.href = "?r=user/center";
                        }else {
                            alert(json.msg);
                        }
                    }
                });
                return false;
            });
//         }

        });

    </script>
    <!--[if lte IE 8]>
    <script type="text/javascript" src="http://wenda.ghostchina.com/static/js/respond.js"></script>

    <![endif]-->
</head>
<noscript unselectable="on" id="noscript">
    <div class="aw-404 aw-404-wrap container">
        <img src="http://wenda.ghostchina.com/static/common/no-js.jpg">
        <p>你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!</p>
    </div>
</noscript>
<body>


<div class="aw-container-wrap">
    <div class="container aw-publish">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-9 aw-main-content">
                    <!-- tab 切换 -->
                    <ul class="nav nav-tabs aw-nav-tabs active">
                        <li class="active"><a href="#">文章</a></li>
                        <h2 class="hidden-xs"><i class="icon icon-ask"></i> 发起</h2>
                    </ul>
                    <!-- end tab 切换 -->
                    <form action="<?php echo Url::to(['article/add-publis-harticle'])?>" method="post" id="question_form" >
                        <input type="hidden" name="post_hash" value="2c22068d604009ee" />
                        <input type="hidden" name="attach_access_key" value="44c0e4223698c30a52fb11fa59ec24b4" />
                        <input type="hidden" name="question_id" id="question_id" value="" />
                        <input type="hidden" name="ask_user_id" value="" />

                        <div class="aw-mod aw-mod-publish">
                            <div class="mod-body">
                                <h3>文章标题:</h3>
                                <!-- 问题标题 -->
                                <div class="aw-publish-title">
                                    <div>
                                        <input type="text" name="question_content" id="question_content" value="" class="form-control" />
                                    </div>
                                </div>
                                <!-- end 问题标题 -->

                                <h3>文章内容:</h3>
                                <div class="aw-mod aw-editor-box">
                                    <div class="mod-head">
                                        <div class="wmd-panel">
                                            <div id="wmd-button-bar"></div>
                                            <textarea class="wmd-input form-control autosize" id="question_detail" rows="15" name="question_detail"></textarea>
                                        </div>
                                    </div>
                                    <div class="mod-body">
                                        <span class="pull-right text-color-999" id="question_detail_message">&nbsp;</span>
                                    </div>

                                </div>
                            </div>
                            <div class="mod-footer clearfix">
								<span class="aw-anonymity">

								</span>
                                <div class="mod-footer clearfix">
                                    <button class="btn btn-large btn-success pull-right" type="submit" name="login" id="loginButton">确认发布</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- 侧边栏 -->
                <div class="col-sm-12 col-md-3 aw-side-bar hidden-xs">
                    <!-- 问题发起指南 -->
                    <div class="aw-mod publish-help">
                        <div class="mod-head">
                            <h3>文章发起指南</h3>
                        </div>
                        <div class="mod-body">
                            <p><b>• 文章标题:</b> 请用准确的语言描述您发布的问题思想</p>
                            <p><b>• 文章内容:</b> 详细补充您的问题内容, 并提供一些相关的素材以供参与者更多的了解您所要问题的主题思想</p>
                        </div>
                    </div>
                    <!-- end 问题发起指南 -->
                </div>
                <!-- end 侧边栏 -->
            </div>
        </div>
    </div>
</div>



<div class="aw-footer-wrap">
    <div class="aw-footer">
        123213123<span class="hidden-xs"> </span>

        <span class="hide">Powered By <a href="#" target="blank">WeCenter 3.0 Beta 2</a></span>

    </div>
</div>
</body>
</html>
